iface->get_style = gtk_style_properties_get_style;
}
-static GtkStyleProperty *
+static const GtkStyleProperty *
gtk_style_property_lookup (const char *name)
{
if (!properties)
gtk_style_properties_register_property (GtkStylePropertyParser parse_func,
GParamSpec *pspec)
{
+ const GtkStyleProperty *existing;
GtkStyleProperty *node;
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
if (G_UNLIKELY (!properties))
properties = g_hash_table_new (g_str_hash, g_str_equal);
- if ((node = gtk_style_property_lookup (pspec->name)) != NULL)
+ existing = gtk_style_property_lookup (pspec->name);
+ if (existing != NULL)
{
g_warning ("Property \"%s\" was already registered with type %s",
- pspec->name, g_type_name (node->pspec->value_type));
+ pspec->name, g_type_name (existing->pspec->value_type));
return;
}
GtkStylePropertyParser *parse_func,
GParamSpec **pspec)
{
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
GtkStylePropertiesClass *klass;
gboolean found = FALSE;
GtkStateFlags state,
const GValue *value)
{
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props));
g_return_if_fail (property != NULL);
while (property_name)
{
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
PropertyData *prop;
gchar *error = NULL;
GValue *val;
}
static gboolean
-style_properties_resolve_type (GtkStyleProperties *props,
- GtkStyleProperty *node,
- GValue *val)
+style_properties_resolve_type (GtkStyleProperties *props,
+ const GtkStyleProperty *node,
+ GValue *val)
{
if (val && G_VALUE_TYPE (val) == GTK_TYPE_SYMBOLIC_COLOR)
{
}
static void
-lookup_default_value (GtkStyleProperty *node,
- GValue *value)
+lookup_default_value (const GtkStyleProperty *node,
+ GValue *value)
{
if (node->pspec->value_type == GTK_TYPE_THEMING_ENGINE)
g_value_set_object (value, gtk_theming_engine_load (NULL));
GtkStateFlags state)
{
GtkStylePropertiesPrivate *priv;
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
PropertyData *prop;
GValue *val;
GValue *value)
{
GtkStylePropertiesPrivate *priv;
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
PropertyData *prop;
GValue *val;
while (property_name)
{
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
PropertyData *prop;
gchar *error = NULL;
GValue *val = NULL;
GtkStateFlags state)
{
GtkStylePropertiesPrivate *priv;
- GtkStyleProperty *node;
+ const GtkStyleProperty *node;
PropertyData *prop;
guint pos;